package com.foreknow.demo9;

public class Manager {

    public void M1(B b) {
        b.method3();
    }

    public B M2() {
        B b = new BImpl();
        return b;
    }

    public static void main(String[] args) {
        Manager manager = new Manager();
        B bb = new BImpl();
        manager.M1(bb);

        B bs = manager.M2();
        bs.method3();
    }

}
